home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 37 / hot37.iso / FICHEROS / WEDU / MICSCOP3.ZIP / MENUSYS.CST / 00041_Script_Do Commands < prev    next >
Text File  |  1998-05-18  |  4KB  |  185 lines

  1. global printtest, teacher, studentName, coursecode, ACommand
  2. global LastFrame
  3. global TestNumber
  4.  
  5. on DoLesson LessonNumber
  6.   -- Can't use play here because I will not know which movie to play
  7.   -- and i don't want to return to this movie
  8.   go to movie "Lesson" & string (LessonNumber)
  9. end DoLesson
  10.  
  11. on DoContent ContentNumber
  12.   ResetSprites
  13.   case ContentNumber of
  14.     1: Content1
  15.     2: Content2
  16.     3: Content3
  17.     4: Content4
  18.     5: Content5
  19.   end case
  20. end
  21.  
  22. on Content1
  23.   ReSetSprites
  24.   go to frame "C1"
  25.   updatestage
  26.   SetUpC1        -- script in each Lesson
  27. end
  28. on Content2
  29.   ReSetSprites
  30.   go to frame "C2"
  31.   updatestage
  32.   SetUpC2        -- script in each Lesson
  33. end 
  34. on Content3
  35.   ReSetSprites
  36.   go to frame "C3"
  37.   updatestage
  38.   SetUpC3        -- script in each Lesson
  39. end
  40. on Content4
  41.   ReSetSprites
  42.   go to frame "C4"
  43.   updatestage
  44.   SetUpC4        -- script in each Lesson
  45. end
  46. on Content5
  47.   ReSetSprites
  48.   go to frame "C5"
  49.   updatestage
  50.   SetUpC5        -- script in each Lesson
  51. end
  52.  
  53. on CancelTest 
  54.   CloseTestDialogWindow
  55.   ResetSprites
  56.   --  ShowNextButton
  57.   global LastFrame
  58.   if voidp (LastFrame) then
  59.     set LastFrame to 1
  60.   end if
  61.   -- some tests are puppeting and controling next and back buttons
  62.   -- so set them back up as non puppets
  63.   ResetNavigationButtons
  64.   if voidP (LastFrame) then
  65.     set LastFrame to "C1"
  66.   end if
  67.   go to LastFrame
  68.   continue
  69. end
  70.  
  71. on HideNextThreeButton
  72.   VisibleSprites [34], false
  73.   CursorSprites [34], 0
  74. end
  75.  
  76. on ShowNextThreeButton
  77.   VisibleSprites [34], true
  78.   CursorSprites [34], [the number of member "PH", the number of member "PH_Mask"]
  79. end
  80.  
  81. on Test1
  82.   ResetSprites
  83.   go to frame "T1"
  84.   SetUpT1
  85. end
  86. on Test2
  87.   ResetSprites
  88.   go to frame "T2"
  89.   SetUpT2
  90. end
  91. on Test3
  92.   ResetSprites
  93.   go to frame "T3"
  94. end
  95. on Test4
  96.   ResetSprites
  97.   go to frame "T4"
  98.   SetUpT4
  99. end
  100.  
  101. on ShowInstructions
  102.   OpenInstructionWindow
  103.   global DialogWindow
  104. end ShowInstructions
  105.  
  106. on OpenInstructionWindow
  107.   global DialogWindow
  108.   if objectP (DialogWindow) then
  109.     forget DialogWindow
  110.   end if
  111.   
  112.   set horzOrigin to the stageleft + 160
  113.   set vertOrigin to the stagetop + 120
  114.   set DialogWindowRect to rect (horzOrigin, vertOrigin, horzOrigin + 320, vertOrigin+ 240)
  115.   set DialogWindow to window "Help"
  116.   set the rect of DialogWindow to DialogWindowRect
  117.   set the fileName of DialogWindow to "Help.dir"
  118.   set the titleVisible of DialogWindow to false
  119.   set the modal of DialogWindow to true       -- only respond to window
  120.   open DialogWindow
  121. end 
  122.  
  123. on CloseInstructions
  124.   CloseTestDialogWindow
  125. end CloseInstructions
  126.  
  127. on AskTest MessageString, Title
  128.   set printtest to false
  129.   OpenTestDialogWindow
  130.   global DialogWindow
  131.   tell DialogWindow
  132.     set the text of member "Test Title field" to Title
  133.     set the text of member "Message Text" to MessageString
  134.   end tell
  135. end
  136.  
  137. on OpenTestDialogWindow
  138.   global DialogWindow
  139.   OpenDialogWindow
  140.   --  set the visible of sprite 48 to true
  141.   open DialogWindow
  142. end OpenTestDialogWindow
  143.  
  144. on OpenDialogWindow
  145.   global DialogWindow
  146.   if objectP (DialogWindow) then
  147.     forget DialogWindow
  148.   end if
  149.   set horzOrigin to the stageleft + 160
  150.   set vertOrigin to the stagetop + 120
  151.   set DialogWindowRect to rect (horzOrigin, vertOrigin, horzOrigin + 320, vertOrigin+ 240)
  152.   set DialogWindow to window "TestDial"
  153.   set the rect of DialogWindow to DialogWindowRect
  154.   set the fileName of DialogWindow to "TestDial.dir"
  155.   set the titleVisible of DialogWindow to false
  156.   set the modal of DialogWindow to true       -- only respond to window
  157. end
  158.  
  159. on CloseTestDialogWindow
  160.   --  set the visible of sprite 48 to false
  161.   updatestage
  162.   global DialogWindow
  163.   --  set the modal of DialogWindow to false
  164.   close DialogWindow
  165. --  forget DialogWindow
  166.   
  167. end CloseDialogWindow
  168.  
  169.  
  170. on CheckAnswersButton State  --????
  171.   -- this will be called by the score
  172.   -- the check answers button will always be in sprite 34
  173.   global AnswersButton
  174.   set AnswersButton to State
  175.   case AnswersButton of
  176.     true:
  177.       VisibleSprites [34], true
  178.       CursorSprites [34],[the number of member "PH"],[the number of member "PH_Mask"]
  179.     false:
  180.       VisibleSprites [34], false
  181.       CursorSprites [34],0
  182.   end case      
  183. end
  184.  
  185.